﻿var cityArr = [];
cityArr[1] = [ 
{txt:'东城区', val:'381'},
{txt:'西城区', val:'382'},
{txt:'崇文区', val:'383'},
{txt:'宣武区', val:'384'},
{txt:'朝阳区', val:'385'},
{txt:'海淀区', val:'386'},
{txt:'丰台区', val:'387'},
{txt:'石景山区', val:'388'},
{txt:'通州区', val:'389'},
{txt:'平谷区', val:'390'},
{txt:'顺义区', val:'391'},
{txt:'怀柔区', val:'392'},
{txt:'昌平区', val:'393'},
{txt:'门头沟区', val:'394'},
{txt:'房山区', val:'395'},
{txt:'大兴区', val:'396'},
{txt:'密云县', val:'397'},
{txt:'延庆县', val:'398'}
]; 

cityArr[2] = [ 
{txt:'和平区', val:'399'},
{txt:'河东区', val:'400'},
{txt:'河西区', val:'401'},
{txt:'南开区', val:'402'},
{txt:'河北区', val:'403'},
{txt:'红桥区', val:'404'},
{txt:'塘沽区', val:'405'},
{txt:'汉沽区', val:'406'},
{txt:'大港区', val:'407'},
{txt:'东丽区', val:'408'},
{txt:'西青区', val:'409'},
{txt:'津南区', val:'410'},
{txt:'北辰区', val:'411'},
{txt:'武清区', val:'412'},
{txt:'宝坻区', val:'413'}
]; 

cityArr[3] = [ 
{txt:'石家庄', val:'40'},
{txt:'唐山', val:'41'},
{txt:'秦皇岛', val:'42'},
{txt:'张家口', val:'43'},
{txt:'承德', val:'44'},
{txt:'廊坊', val:'45'},
{txt:'邯郸', val:'46'},
{txt:'邢台', val:'47'},
{txt:'保定', val:'48'},
{txt:'沧州', val:'49'},
{txt:'衡水', val:'50'}
]; 

cityArr[4] = [ 
{txt:'太原', val:'51'},
{txt:'大同', val:'52'},
{txt:'阳泉', val:'53'},
{txt:'晋城', val:'54'},
{txt:'朔州', val:'55'},
{txt:'忻州', val:'56'},
{txt:'离石', val:'57'},
{txt:'榆次', val:'58'},
{txt:'临汾', val:'59'},
{txt:'运城', val:'60'},
{txt:'长治', val:'61'}
]; 

cityArr[5] = [ 
{txt:'呼和浩特', val:'62'},
{txt:'包头', val:'63'},
{txt:'乌海', val:'64'},
{txt:'集宁', val:'65'},
{txt:'东胜', val:'66'},
{txt:'临河', val:'67'},
{txt:'阿拉善左旗', val:'68'},
{txt:'赤峰', val:'69'},
{txt:'通辽', val:'70'},
{txt:'锡林浩特', val:'71'},
{txt:'海拉尔', val:'72'},
{txt:'乌兰浩特', val:'73'}
]; 

cityArr[6] = [ 
{txt:'沈阳', val:'74'},
{txt:'大连', val:'75'},
{txt:'鞍山', val:'76'},
{txt:'抚顺', val:'77'},
{txt:'本溪', val:'78'},
{txt:'锦州', val:'79'},
{txt:'营口', val:'80'},
{txt:'阜新', val:'81'},
{txt:'盘锦', val:'82'},
{txt:'铁岭', val:'83'},
{txt:'朝阳', val:'84'},
{txt:'锦西', val:'85'},
{txt:'丹东', val:'86'}
]; 

cityArr[7] = [ 
{txt:'长春', val:'87'},
{txt:'吉林', val:'88'},
{txt:'四平', val:'89'},
{txt:'辽源', val:'90'},
{txt:'浑江', val:'91'},
{txt:'白城', val:'92'},
{txt:'延吉', val:'93'},
{txt:'通化', val:'94'}
]; 

cityArr[8] = [ 
{txt:'哈尔滨', val:'95'},
{txt:'鸡西', val:'96'},
{txt:'鹤岗', val:'97'},
{txt:'双鸭山', val:'98'},
{txt:'伊春', val:'99'},
{txt:'佳木斯', val:'100'},
{txt:'七台河', val:'101'},
{txt:'牡丹江', val:'102'},
{txt:'绥化', val:'103'},
{txt:'齐齐哈尔', val:'104'},
{txt:'大庆', val:'105'},
{txt:'黑河', val:'106'},
{txt:'加格达奇', val:'107'}
]; 

cityArr[9] = [ 
{txt:'浦东新区', val:'362'},
{txt:'徐汇区', val:'363'},
{txt:'长宁区', val:'364'},
{txt:'普陀区', val:'365'},
{txt:'闸北区', val:'366'},
{txt:'虹口区', val:'367'},
{txt:'杨浦区', val:'368'},
{txt:'黄浦区', val:'369'},
{txt:'卢湾区', val:'370'},
{txt:'静安区', val:'371'},
{txt:'宝山区', val:'372'},
{txt:'闵行区', val:'373'},
{txt:'嘉定区', val:'374'},
{txt:'金山区', val:'375'},
{txt:'松江区', val:'376'},
{txt:'青浦区', val:'377'},
{txt:'松江区', val:'378'},
{txt:'奉贤区', val:'379'},
{txt:'崇明县', val:'380'}
]; 

cityArr[10] = [ 
{txt:'南京', val:'109'},
{txt:'无锡', val:'110'},
{txt:'徐州', val:'111'},
{txt:'常州', val:'112'},
{txt:'苏州', val:'113'},
{txt:'南通', val:'114'},
{txt:'连云港', val:'115'},
{txt:'淮阴', val:'116'},
{txt:'盐城', val:'117'},
{txt:'扬州', val:'118'},
{txt:'镇江', val:'119'}
]; 

cityArr[11] = [ 
{txt:'杭州', val:'120'},
{txt:'宁波', val:'121'},
{txt:'温州', val:'122'},
{txt:'嘉兴', val:'123'},
{txt:'湖州', val:'124'},
{txt:'绍兴', val:'125'},
{txt:'金华', val:'126'},
{txt:'衢州', val:'127'},
{txt:'舟山', val:'128'},
{txt:'丽水', val:'129'},
{txt:'临海', val:'130'}
]; 

cityArr[12] = [ 
{txt:'合肥', val:'131'},
{txt:'芜湖', val:'132'},
{txt:'蚌埠', val:'133'},
{txt:'淮南', val:'134'},
{txt:'马鞍山', val:'135'},
{txt:'淮北', val:'136'},
{txt:'铜陵', val:'137'},
{txt:'安庆', val:'138'},
{txt:'黄山', val:'139'},
{txt:'阜阳', val:'140'},
{txt:'宿州', val:'141'},
{txt:'滁州', val:'142'},
{txt:'六安', val:'143'},
{txt:'宣州', val:'144'},
{txt:'巢湖', val:'145'},
{txt:'贵池', val:'146'}
]; 

cityArr[13] = [ 
{txt:'福州', val:'147'},
{txt:'厦门', val:'148'},
{txt:'莆田', val:'149'},
{txt:'三明', val:'150'},
{txt:'泉州', val:'151'},
{txt:'漳州', val:'152'},
{txt:'南平', val:'153'},
{txt:'宁德', val:'154'},
{txt:'龙岩', val:'155'}
]; 

cityArr[14] = [ 
{txt:'南昌', val:'156'},
{txt:'景德镇', val:'157'},
{txt:'赣州', val:'158'},
{txt:'萍乡', val:'159'},
{txt:'九江', val:'160'},
{txt:'新余', val:'161'},
{txt:'鹰潭', val:'162'},
{txt:'宜春', val:'163'},
{txt:'上饶', val:'164'},
{txt:'吉安', val:'165'},
{txt:'临川', val:'166'}
]; 

cityArr[15] = [ 
{txt:'济南', val:'167'},
{txt:'青岛', val:'168'},
{txt:'淄博', val:'169'},
{txt:'枣庄', val:'170'},
{txt:'东营', val:'171'},
{txt:'烟台', val:'172'},
{txt:'潍坊', val:'173'},
{txt:'济宁', val:'174'},
{txt:'泰安', val:'175'},
{txt:'威海', val:'176'},
{txt:'日照', val:'177'},
{txt:'滨州', val:'178'},
{txt:'德州', val:'179'},
{txt:'聊城', val:'180'},
{txt:'临沂', val:'181'},
{txt:'菏泽', val:'182'}
]; 

cityArr[16] = [ 
{txt:'郑州', val:'183'},
{txt:'开封', val:'184'},
{txt:'洛阳', val:'185'},
{txt:'平顶山', val:'186'},
{txt:'安阳', val:'187'},
{txt:'鹤壁', val:'188'},
{txt:'新乡', val:'189'},
{txt:'焦作', val:'190'},
{txt:'濮阳', val:'191'},
{txt:'许昌', val:'192'},
{txt:'漯河', val:'193'},
{txt:'三门峡', val:'194'},
{txt:'商丘', val:'195'},
{txt:'周口', val:'196'},
{txt:'驻马店', val:'197'},
{txt:'南阳', val:'198'},
{txt:'信阳', val:'199'}
]; 

cityArr[17] = [ 
{txt:'武汉', val:'200'},
{txt:'黄石', val:'201'},
{txt:'十堰', val:'202'},
{txt:'沙市', val:'203'},
{txt:'宜昌', val:'204'},
{txt:'襄樊', val:'205'},
{txt:'鄂州', val:'206'},
{txt:'荆门', val:'207'},
{txt:'黄州', val:'208'},
{txt:'孝感', val:'209'},
{txt:'咸宁', val:'210'},
{txt:'江陵', val:'211'},
{txt:'恩施', val:'212'},
{txt:'天门', val:'454'},
{txt:'仙桃', val:'455'}
]; 

cityArr[18] = [ 
{txt:'长沙', val:'213'},
{txt:'衡阳', val:'214'},
{txt:'邵阳', val:'215'},
{txt:'郴州', val:'216'},
{txt:'永州', val:'217'},
{txt:'大庸', val:'218'},
{txt:'怀化', val:'219'},
{txt:'吉首', val:'220'},
{txt:'株洲', val:'221'},
{txt:'湘潭', val:'222'},
{txt:'岳阳', val:'223'},
{txt:'常德', val:'224'},
{txt:'益阳', val:'225'},
{txt:'娄底', val:'226'}
]; 

cityArr[19] = [ 
{txt:'广州', val:'227'},
{txt:'深圳', val:'228'},
{txt:'汕尾', val:'229'},
{txt:'惠州', val:'230'},
{txt:'河源', val:'231'},
{txt:'佛山', val:'232'},
{txt:'清远', val:'233'},
{txt:'东莞', val:'234'},
{txt:'珠海', val:'235'},
{txt:'江门', val:'236'},
{txt:'肇庆', val:'237'},
{txt:'中山', val:'238'},
{txt:'湛江', val:'239'},
{txt:'茂名', val:'240'},
{txt:'韶关', val:'241'},
{txt:'汕头', val:'242'},
{txt:'梅州', val:'243'},
{txt:'阳江', val:'244'}
]; 

cityArr[20] = [ 
{txt:'南宁', val:'245'},
{txt:'梧州', val:'246'},
{txt:'玉林', val:'247'},
{txt:'桂林', val:'248'},
{txt:'百色', val:'249'},
{txt:'河池', val:'250'},
{txt:'钦州', val:'251'},
{txt:'柳州', val:'252'},
{txt:'北海', val:'253'}
]; 

cityArr[21] = [ 
{txt:'海口', val:'254'},
{txt:'三亚', val:'255'}
]; 

cityArr[22] = [ 
{txt:'渝中区', val:'414'},
{txt:'大渡口区', val:'415'},
{txt:'江北区', val:'416'},
{txt:'沙坪坝区', val:'417'},
{txt:'九龙坡区', val:'418'}, 
{txt:'南岸区', val:'419'},
{txt:'北碚区', val:'420'},
{txt:'万盛区', val:'421'},
{txt:'双桥区', val:'422'},
{txt:'渝北区', val:'423'},
{txt:'巴南区', val:'424'},
{txt:'万州区', val:'425'},
{txt:'涪陵区', val:'426'},
{txt:'黔江区', val:'427'},
{txt:'长寿区', val:'428'},
{txt:'江津区', val:'429'},
{txt:'合川区', val:'430'},
{txt:'永川区', val:'431'},
{txt:'南川区', val:'432'},
{txt:'綦江县', val:'433'},
{txt:'潼南县', val:'434'},
{txt:'铜梁县', val:'435'},
{txt:'大足县', val:'436'},
{txt:'荣昌县', val:'437'},
{txt:'璧山县', val:'438'},
{txt:'垫江县', val:'439'},
{txt:'武隆县', val:'440'},
{txt:'丰都县', val:'441'},
{txt:'城口县', val:'442'},
{txt:'梁平县', val:'443'},
{txt:'开县',   val:'444'},
{txt:'巫溪县', val:'445'},
{txt:'巫山县', val:'446'},
{txt:'奉节县', val:'447'},
{txt:'云阳县', val:'448'},
{txt:'忠县', val:'449'},
{txt:'石柱土家族自治县', val:'450'},
{txt:'彭水苗族土家族自治县', val:'451'},
{txt:'酉阳土家族苗族自治县', val:'452'},
{txt:'秀山土家族苗族自治县', val:'453'}
]; 

cityArr[23] = [ 
{txt:'成都', val:'256'},
{txt:'康定', val:'257'},
{txt:'雅安', val:'258'},
{txt:'马尔康', val:'259'},
{txt:'自贡', val:'260'},
{txt:'南充', val:'262'},
{txt:'泸州', val:'263'},
{txt:'德阳', val:'264'},
{txt:'绵阳', val:'265'},
{txt:'遂宁', val:'266'},
{txt:'内江', val:'267'},
{txt:'乐山', val:'268'},
{txt:'宜宾', val:'269'},
{txt:'广元', val:'270'},
{txt:'达县', val:'271'},
{txt:'西昌', val:'272'},
{txt:'攀枝花', val:'273'}
]; 

cityArr[24] = [ 
{txt:'贵阳', val:'275'},
{txt:'六盘水', val:'276'},
{txt:'铜仁', val:'277'},
{txt:'安顺', val:'278'},
{txt:'凯里', val:'279'},
{txt:'都匀', val:'280'},
{txt:'兴义', val:'281'},
{txt:'毕节', val:'282'},
{txt:'遵义', val:'283'}
]; 

cityArr[25] = [ 
{txt:'昆明', val:'284'},
{txt:'东川', val:'285'},
{txt:'曲靖', val:'286'},
{txt:'楚雄', val:'287'},
{txt:'玉溪', val:'288'},
{txt:'个旧', val:'289'},
{txt:'文山', val:'290'},
{txt:'思茅', val:'291'},
{txt:'昭通', val:'292'},
{txt:'景洪', val:'293'},
{txt:'大理', val:'294'},
{txt:'保山', val:'295'},
{txt:'潞西', val:'296'},
{txt:'丽江纳西族自治县', val:'297'},
{txt:'泸水', val:'298'},
{txt:'中甸', val:'299'},
{txt:'临沧', val:'300'}
]; 

cityArr[26] = [ 
{txt:'拉萨', val:'301'},
{txt:'昌都', val:'302'},
{txt:'乃东', val:'303'},
{txt:'日喀则', val:'304'},
{txt:'那曲', val:'305'},
{txt:'噶尔', val:'306'},
{txt:'林芝', val:'307'}
]; 

cityArr[27] = [ 
{txt:'西安', val:'308'},
{txt:'铜川', val:'309'},
{txt:'宝鸡', val:'310'},
{txt:'咸阳', val:'311'},
{txt:'渭南', val:'312'},
{txt:'汉中', val:'313'},
{txt:'安康', val:'314'},
{txt:'商州', val:'315'},
{txt:'延安', val:'316'},
{txt:'榆林', val:'317'}
]; 

cityArr[28] = [ 
{txt:'兰州', val:'318'},
{txt:'白银', val:'319'},
{txt:'金昌', val:'320'},
{txt:'天水', val:'321'},
{txt:'张掖', val:'322'},
{txt:'武威', val:'323'},
{txt:'定西', val:'324'},
{txt:'成县', val:'325'},
{txt:'平凉', val:'326'},
{txt:'西峰', val:'327'},
{txt:'临夏', val:'328'},
{txt:'夏河', val:'329'},
{txt:'嘉峪关', val:'330'},
{txt:'酒泉', val:'331'}
]; 

cityArr[29] = [ 
{txt:'西宁', val:'332'},
{txt:'平安', val:'333'},
{txt:'门源回族自治县', val:'334'},
{txt:'同仁', val:'335'},
{txt:'共和', val:'336'},
{txt:'玛沁', val:'337'},
{txt:'玉树', val:'338'},
{txt:'德令哈', val:'339'}
]; 

cityArr[30] = [ 
{txt:'银川', val:'340'},
{txt:'石嘴山', val:'341'},
{txt:'吴忠', val:'342'},
{txt:'固原', val:'343'}
]; 

cityArr[31] = [ 
{txt:'乌鲁木齐', val:'344'},
{txt:'克拉玛依', val:'345'},
{txt:'吐鲁番', val:'346'},
{txt:'哈密', val:'347'},
{txt:'昌吉', val:'348'},
{txt:'博乐', val:'349'},
{txt:'库尔勒', val:'350'},
{txt:'阿克苏', val:'351'},
{txt:'阿图什', val:'352'},
{txt:'喀什', val:'353'},
{txt:'伊宁', val:'354'}
]; 

cityArr[32] = [ 
{txt:'台北', val:'355'},
{txt:'基隆', val:'356'},
{txt:'台南', val:'357'},
{txt:'高雄', val:'358'},
{txt:'台中', val:'359'}
]; 

cityArr[33] = [ 
{txt:'香港', val:'361'}
]; 

cityArr[34] = [ 
{txt:'澳门', val:'360'}
]; 

function setCity(province)  //生成城市列表选项
            {       
       
            setSelectOption('city', cityArr[province], '-请选择-','-请选择-');
            
            function setSelectOption(selectObj, optionList, firstOption, selected) {     
            if (typeof selectObj != 'object')
            {         
            selectObj = document.getElementById(selectObj);     
            }      
             // 清空选项     
            removeOptions(selectObj);  
            
            function removeOptions(selectObj) 
            {     
            if (typeof selectObj != 'object')
            { selectObj = document.getElementById(selectObj);}          
                
             // 原有选项计数    
            var len = selectObj.options.length;      
            for (var i=0; i < len; i++)      {         
            // 移除当前选项        
            selectObj.options[0] = null;    
            } }  
               
             // 选项计数     
            var start = 0;           
            // 如果需要添加第一个选项     
            if (firstOption){         
            selectObj.options[0] = new Option(firstOption, '');    
             // 选项计数从 1 开始         
            start ++;     
            }      
            var len = optionList.length;      
            for (var i=0; i < len; i++) {        
            // 设置 option         
            selectObj.options[start] = new Option(optionList[i].txt, optionList[i].val);          
            // 选中项         
            if(selected == optionList[i].val){             
            selectObj.options[start].selected = true;         
            }          
            // 计数加 1         
            start ++;
            } } 
            
            
            }